* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #0f1c3c;
    color: #fff;
}

.dashboard {
    padding: 2vh 2vw;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2vh;
}

header h1 {
    font-size: calc(20px + 0.5vw);
    margin-bottom: 1vh;
}

.update-time {
    font-size: 14px;
    color: #8f9bba;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2vw;
    margin-bottom: 3vh;
}

.card {
    background-color: #1e2b4a;
    padding: 2vh 1.5vw;
    border-radius: 8px;
    text-align: center;
}

.card h3 {
    font-size: calc(14px + 0.2vw);
    margin-bottom: 1vh;
    color: #8f9bba;
}

.card .number {
    font-size: calc(20px + 0.4vw);
    font-weight: bold;
    color: #00f0ff;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2vw;
}

.chart-wrapper {
    background-color: #1e2b4a;
    padding: 2vh 1.5vw;
    border-radius: 8px;
}

/* 客户年龄分布和客户行为分析图表 */
.chart-wrapper:nth-child(1) .chart,
.chart-wrapper:nth-child(2) .chart {
    height: 40vh;
    width: 100%;
}

/* 产品持有分析图表（全宽） */
.chart-wrapper.full-width .chart {
    height: 45vh;
    width: 100%;
}

/* 营销分析图表（饼图和漏斗图） */
.chart-wrapper:nth-child(4) .chart,
.chart-wrapper:nth-child(5) .chart {
    height: 35vh;
    width: 100%;
}

.full-width {
    grid-column: span 2;
}

/* 大屏幕适配 (≥1200px) */
@media (min-width: 1200px) {
    .dashboard {
        padding: 3vh 3vw;
    }
    
    .chart-wrapper:nth-child(1) .chart,
    .chart-wrapper:nth-child(2) .chart {
        height: 45vh;
    }
    
    .chart-wrapper.full-width .chart {
        height: 50vh;
    }
}

/* 平板电脑和小屏幕设备 (≤992px) */
@media (max-width: 992px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .full-width {
        grid-column: span 1;
    }
    
    .chart-wrapper .chart {
        height: 50vh;
    }
}

/* 手机设备 (≤576px) */
@media (max-width: 576px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        padding: 2vh 3vw;
    }
    
    .chart-wrapper .chart {
        height: 40vh;
    }
    
    .card {
        padding: 3vh 4vw;
    }
}
